﻿using Nop.Plugin.Misc.TabManager.Domain;
using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Nop.Plugin.Misc.TabManager.Data
{
    public class TabMap : EntityTypeConfiguration<Tab>
    {
        public TabMap()
        {
            ToTable("Tabs");
            HasKey(m => m.Id);

            Property(m => m.TabName).HasMaxLength(75);
            Property(m => m.LogOnRequired);
            Property(m => m.Title).HasMaxLength(75); 
            Property(m => m.TabOrder);
            Property(m => m.CultureCode);
            Property(m => m.Description).HasMaxLength(75);
            Property(m => m.DisableLink);
            Property(m => m.TabLevel);
            Property(m => m.StoreId); 
            Property(m => m.TopicId); 
            Property(m => m.CategoryId);
            Property(m => m.StartDate);
            Property(m => m.EndDate);
            Property(m => m.HasChildren);
            Property(m => m.IsActive);
            Property(m => m.IsDeleted);
            Property(m => m.IsSecure);
            Property(m => m.IsVisible);
            Property(m => m.KeyWords).HasMaxLength(1024);
            Property(m => m.ParentTabId);
            Property(m => m.PermanentRedirect);
            Property(m => m.PermanentRedirectUrl).HasMaxLength(512);
            Property(m => m.TabController).HasMaxLength(75);
            Property(m => m.TabControllerAction).HasMaxLength(75);
            Property(m => m.CreatedDate);
            Property(m => m.CreatedUserId);
            Property(m => m.LastModifiedDate);
            Property(m => m.LastModifiedUserId);
        }
    }
}
